package com.ranjiaqi.thread01;

/**
 * @ClassName Produce
 * @Description TODO
 * @Author hp
 * @Date 2021/6/29 9:11
 * @Version 1.0
 **/

/**
 * 生产者线程
 * 判断标志
 * 不该生产就等待
 * 该生产，计数器++
 */
public class Produce implements Runnable{
    private Resource r = Resource.getInstance();

    @Override
    public void run() {
        while (true){
            r.produce();
        }
    }
}
